Welcome Guest, you are in: Login
CTS Futures

Page History: OCO Order

Compare Page Revisions



« Older Revision - Back to Page History - Newer Revision »


Page Revision: 2013/02/28 09:46


An OCO (One Cancels Other or Order Cancels Order) consists of a buy limit order below the market and a buy stop order above the market, or a sell limit order above the market and a sell stop order below the market. When one gets filled the other is cancelled. If one is partially filled then the volume on the other is reduced accordingly.

An OCO Order is submitted with the New Order List (Tag 35=E) message.

Following are the most relevant tags to build an OCO order.

Tag 1385=1ContingencyTypeSpecifier of OCO order type
Tag 44PricePrice of Limit component of OCO. Must be below last traded price for Buys and above for Sells.
Tag 99Stop PricePrice of Stop component of OCO. Must be above last traded price for Buys and below for Sells.
Tag 48SecurityIDMarket for which the order is sent
Tag 55SymbolContract for which the order is sent
Tag 200SecurityExchangeExchange for which the order is sent
Tag 167SecurityTypeSecurity Type (e.g. Futures) of this specific market

OCO orders can also be GTC's, StopLimit or Trailing. Activation is not supported with OCO orders. Please note that OCO's are not intended to be used where both orders are very close together, for example at consecutive prices or at the best bid and best offer prices. For this scenario, it is likely that both components would get filled in an active market

Sample

In this example, a buy OCO order is submitted at the Limit Component Price of 149650 (Tag 44 =149650) with a Stop Component Price of 150000 (Tag 99 = 150000). The Limit component is filled and subsequently the Stop component is canceled.

OCO Order
>> 2/28/2013 9:39:27 AM   [FIXNEWORDERLIST] 34=13|49=T4Example|56=T4|50=TraderName|52=20130228-15:39:27.148|66=fnl-634976411671480107|1385=1|1=Account1|48=CME_20130300_ESH3|55=ES|207=CME_Eq|167=FUT|433=1|68=2|11=oco-1-634976411671480107|54=1|38=1|40=2|44=149950|59=0|21=2|60=20130228-15:39:27.148|11=oco-2-634976411671480107|54=1|38=1|40=3|99=150000|59=0|21=2|60=20130228-15:39:27.148|
[FIXNEWORDERLIST]
[MsgSeqNum] 34 = 13
[SenderCompID] 49 = T4Example
[TargetCompID] 56 = T4
[SenderSubID] 50 = TraderName
[SendingTime] 52 = 20130228-15:39:27.148
[ListID] 66 = fnl-634976411671480107
[ContingencyType] 1385 = 1 (OCO)
[Account] 1 = Account1
[SecurityID] 48 = CME_20130300_ESH3
[Symbol] 55 = ES
[SecurityExchange] 207 = CME_Eq
[SecurityType] 167 = FUT (FUTURE)
[ListExecInstType] 433 = 1 (IMMEDIATE)
[TotNoOrders] 68 = 2
[ClOrdID] 11 = oco-1-634976411671480107
[Side] 54 = 1 (BUY)
[OrderQty] 38 = 1
[OrdType] 40 = 2 (LIMIT)
[Price] 44 = 149950
[TimeInForce] 59 = 0 (DAY)
[HandlInst] 21 = 2 (AUTOMATED_EXECUTION_ORDER_PUBLIC_BROKER_INTERVENTION_OK)
[TransactTime] 60 = 20130228-15:39:27.148
[ClOrdID] 11 = oco-2-634976411671480107
[Side] 54 = 1 (BUY)
[OrderQty] 38 = 1
[OrdType] 40 = 3 (STOP)
[StopPx] 99 = 150000
[TimeInForce] 59 = 0 (DAY)
[HandlInst] 21 = 2 (AUTOMATED_EXECUTION_ORDER_PUBLIC_BROKER_INTERVENTION_OK)
[TransactTime] 60 = 20130228-15:39:27.148

OCO Order Response - Limit Component Working
<< 2/28/2013 9:39:27 AM  [fixexecutionreport] 34=728|49=T4|56=T4Example|50=T4FIX|52=20130228-15:39:27.179|143=US,IL|1=Account1|11=oco-1-634976411671480107|66=fnl-634976411671480107|17=48115.6421177333_ESH3.6349764117188400006.1.CD488062|150=0|37=CD488062-8E85-43DD-B7E1-84F705F665B3|39=0|48=CME_20130300_ESH3|55=ES|207=CME_Eq|200=201303|59=0|107=E-mini S&P 500 Mar13|54=1|167=FUT|38=1|40=2|44=149950|60=20130228-15:39:31.884|21=1|204=0|1385=1|
[FIXEXECUTIONREPORT]
[MsgSeqNum] 34 = 728
[SenderCompID] 49 = T4
[TargetCompID] 56 = T4Example
[SenderSubID] 50 = T4FIX
[SendingTime] 52 = 20130228-15:39:27.179
[TargetLocationID] 143 = US,IL
[Account] 1 = Account1
[ClOrdID] 11 = oco-1-634976411671480107
[ListID] 66 = fnl-634976411671480107
[ExecID] 17 = 48115.6421177333_ESH3.6349764117188400006.1.CD488062
[ExecType] 150 = 0 (NEW)
[OrderID] 37 = CD488062-8E85-43DD-B7E1-84F705F665B3
[OrdStatus] 39 = 0 (NEW)
[SecurityID] 48 = CME_20130300_ESH3
[Symbol] 55 = ES
[SecurityExchange] 207 = CME_Eq
[MaturityMonthYear] 200 = 201303
[TimeInForce] 59 = 0 (DAY)
[SecurityDesc] 107 = E-mini S&P 500 Mar13
[Side] 54 = 1 (BUY)
[SecurityType] 167 = FUT (FUTURE)
[OrderQty] 38 = 1
[OrdType] 40 = 2 (LIMIT)
[Price] 44 = 149950
[TransactTime] 60 = 20130228-15:39:31.884
[HandlInst] 21 = 1 (AUTOMATED_EXECUTION_ORDER_PRIVATE_NO_BROKER_INTERVENTION)
[CustomerOrFirm] 204 = 0 (CUSTOMER)
[ContingencyType] 1385 = 1 (OCO)

OCO Order Response - Stop Component Working
<< 2/28/2013 9:39:27 AM  [fixexecutionreport] 34=730|49=T4|56=T4Example|50=T4FIX|52=20130228-15:39:27.319|143=US,IL|1=Account1|11=oco-2-634976411671480107|66=fnl-634976411671480107|17=48116.6421177334_ESH3.6349764117189100006.1.F5B7F280|150=0|37=F5B7F280-56A7-4EC7-8CFA-681A512305CB|39=0|48=CME_20130300_ESH3|55=ES|207=CME_Eq|200=201303|59=0|107=E-mini S&P 500 Mar13|54=1|167=FUT|38=1|40=3|99=150000|60=20130228-15:39:31.891|21=1|204=0|1385=1|
[FIXEXECUTIONREPORT]
[MsgSeqNum] 34 = 730
[SenderCompID] 49 = T4
[TargetCompID] 56 = T4Example
[SenderSubID] 50 = T4FIX
[SendingTime] 52 = 20130228-15:39:27.319
[TargetLocationID] 143 = US,IL
[Account] 1 = Account1
[ClOrdID] 11 = oco-2-634976411671480107
[ListID] 66 = fnl-634976411671480107
[ExecID] 17 = 48116.6421177334_ESH3.6349764117189100006.1.F5B7F280
[ExecType] 150 = 0 (NEW)
[OrderID] 37 = F5B7F280-56A7-4EC7-8CFA-681A512305CB
[OrdStatus] 39 = 0 (NEW)
[SecurityID] 48 = CME_20130300_ESH3
[Symbol] 55 = ES
[SecurityExchange] 207 = CME_Eq
[MaturityMonthYear] 200 = 201303
[TimeInForce] 59 = 0 (DAY)
[SecurityDesc] 107 = E-mini S&P 500 Mar13
[Side] 54 = 1 (BUY)
[SecurityType] 167 = FUT (FUTURE)
[OrderQty] 38 = 1
[OrdType] 40 = 3 (STOP)
[StopPx] 99 = 150000
[TransactTime] 60 = 20130228-15:39:31.891
[HandlInst] 21 = 1 (AUTOMATED_EXECUTION_ORDER_PRIVATE_NO_BROKER_INTERVENTION)
[CustomerOrFirm] 204 = 0 (CUSTOMER)
[ContingencyType] 1385 = 1 (OCO)

OCO Order Response - Limit Component is filled
<< 2/28/2013 9:40:41 AM  [fixexecutionreport] 34=910|49=T4|56=T4Example|50=T4FIX|52=20130228-15:40:41.466|143=US,IL|1=Account1|11=oco-1-634976411671480107|66=fnl-634976411671480107|17=64205:2851934TN0022138.63497641246180000021.2.CD488062|150=F|37=CD488062-8E85-43DD-B7E1-84F705F665B3|39=2|48=CME_20130300_ESH3|55=ES|207=CME_Eq|200=201303|59=0|107=E-mini S&P 500 Mar13|54=1|167=FUT|38=1|40=2|44=149950|31=149950|32=1|14=1|151=0|60=20130228-15:40:46.128|21=1|204=0|337=TRADE|375=CME000A|1385=1|
[FIXEXECUTIONREPORT]
[MsgSeqNum] 34 = 910
[SenderCompID] 49 = T4
[TargetCompID] 56 = T4Example
[SenderSubID] 50 = T4FIX
[SendingTime] 52 = 20130228-15:40:41.466
[TargetLocationID] 143 = US,IL
[Account] 1 = Account1
[ClOrdID] 11 = oco-1-634976411671480107
[ListID] 66 = fnl-634976411671480107
[ExecID] 17 = 64205:2851934TN0022138.63497641246180000021.2.CD488062
[ExecType] 150 = F
[OrderID] 37 = CD488062-8E85-43DD-B7E1-84F705F665B3
[OrdStatus] 39 = 2 (FILLED)
[SecurityID] 48 = CME_20130300_ESH3
[Symbol] 55 = ES
[SecurityExchange] 207 = CME_Eq
[MaturityMonthYear] 200 = 201303
[TimeInForce] 59 = 0 (DAY)
[SecurityDesc] 107 = E-mini S&P 500 Mar13
[Side] 54 = 1 (BUY)
[SecurityType] 167 = FUT (FUTURE)
[OrderQty] 38 = 1
[OrdType] 40 = 2 (LIMIT)
[Price] 44 = 149950
[LastPx] 31 = 149950
[LastShares] 32 = 1
[CumQty] 14 = 1
[LeavesQty] 151 = 0
[TransactTime] 60 = 20130228-15:40:46.128
[HandlInst] 21 = 1 (AUTOMATED_EXECUTION_ORDER_PRIVATE_NO_BROKER_INTERVENTION)
[CustomerOrFirm] 204 = 0 (CUSTOMER)
[ContraTrader] 337 = TRADE
[ContraBroker] 375 = CME000A
[ContingencyType] 1385 = 1 (OCO)

OCO Order Response - Stop Component Pending Cancel
<< 2/28/2013 9:40:41 AM  [fixexecutionreport] 34=912|49=T4|56=T4Example|50=T4FIX|52=20130228-15:40:41.731|143=US,IL|1=Account1|11=oco-2-634976411671480107|66=fnl-634976411671480107|17=48116.6421177334_ESH3.63497641171891000014.1.F5B7F280|150=6|37=F5B7F280-56A7-4EC7-8CFA-681A512305CB|39=6|48=CME_20130300_ESH3|55=ES|207=CME_Eq|200=201303|59=0|107=E-mini S&P 500 Mar13|54=1|167=FUT|38=0|40=3|99=150000|58=OCO Pull: PullRiskSuccess. Pull passed risk management|60=20130228-15:39:31.804|21=1|204=0|1385=1|
[FIXEXECUTIONREPORT]
[MsgSeqNum] 34 = 912
[SenderCompID] 49 = T4
[TargetCompID] 56 = T4Example
[SenderSubID] 50 = T4FIX
[SendingTime] 52 = 20130228-15:40:41.731
[TargetLocationID] 143 = US,IL
[Account] 1 = Account1
[ClOrdID] 11 = oco-2-634976411671480107
[ListID] 66 = fnl-634976411671480107
[ExecID] 17 = 48116.6421177334_ESH3.63497641171891000014.1.F5B7F280
[ExecType] 150 = 6 (PENDING_CANCEL)
[OrderID] 37 = F5B7F280-56A7-4EC7-8CFA-681A512305CB
[OrdStatus] 39 = 6 (PENDING_CANCEL)
[SecurityID] 48 = CME_20130300_ESH3
[Symbol] 55 = ES
[SecurityExchange] 207 = CME_Eq
[MaturityMonthYear] 200 = 201303
[TimeInForce] 59 = 0 (DAY)
[SecurityDesc] 107 = E-mini S&P 500 Mar13
[Side] 54 = 1 (BUY)
[SecurityType] 167 = FUT (FUTURE)
[OrderQty] 38 = 0
[OrdType] 40 = 3 (STOP)
[StopPx] 99 = 150000
[Text] 58 = OCO Pull: PullRiskSuccess. Pull passed risk management
[TransactTime] 60 = 20130228-15:39:31.804
[HandlInst] 21 = 1 (AUTOMATED_EXECUTION_ORDER_PRIVATE_NO_BROKER_INTERVENTION)
[CustomerOrFirm] 204 = 0 (CUSTOMER)
[ContingencyType] 1385 = 1 (OCO)

OCO Order Response - Stop Component Pending Cancel (to exchange)
<< 2/28/2013 9:40:41 AM  [fixexecutionreport] 34=913|49=T4|56=T4Example|50=T4FIX|52=20130228-15:40:41.731|143=US,IL|1=Account1|11=oco-2-634976411671480107|66=fnl-634976411671480107|17=48117.6421177334_ESH3.63497641171891000016.1.F5B7F280|150=6|37=F5B7F280-56A7-4EC7-8CFA-681A512305CB|39=6|48=CME_20130300_ESH3|55=ES|207=CME_Eq|200=201303|59=0|107=E-mini S&P 500 Mar13|54=1|167=FUT|38=0|40=3|99=150000|58=OCO Pull|60=20130228-15:39:31.891|21=1|204=0|1385=1|
[FIXEXECUTIONREPORT]
[MsgSeqNum] 34 = 913
[SenderCompID] 49 = T4
[TargetCompID] 56 = T4Example
[SenderSubID] 50 = T4FIX
[SendingTime] 52 = 20130228-15:40:41.731
[TargetLocationID] 143 = US,IL
[Account] 1 = Account1
[ClOrdID] 11 = oco-2-634976411671480107
[ListID] 66 = fnl-634976411671480107
[ExecID] 17 = 48117.6421177334_ESH3.63497641171891000016.1.F5B7F280
[ExecType] 150 = 6 (PENDING_CANCEL)
[OrderID] 37 = F5B7F280-56A7-4EC7-8CFA-681A512305CB
[OrdStatus] 39 = 6 (PENDING_CANCEL)
[SecurityID] 48 = CME_20130300_ESH3
[Symbol] 55 = ES
[SecurityExchange] 207 = CME_Eq
[MaturityMonthYear] 200 = 201303
[TimeInForce] 59 = 0 (DAY)
[SecurityDesc] 107 = E-mini S&P 500 Mar13
[Side] 54 = 1 (BUY)
[SecurityType] 167 = FUT (FUTURE)
[OrderQty] 38 = 0
[OrdType] 40 = 3 (STOP)
[StopPx] 99 = 150000
[Text] 58 = OCO Pull
[TransactTime] 60 = 20130228-15:39:31.891
[HandlInst] 21 = 1 (AUTOMATED_EXECUTION_ORDER_PRIVATE_NO_BROKER_INTERVENTION)
[CustomerOrFirm] 204 = 0 (CUSTOMER)
[ContingencyType] 1385 = 1 (OCO)

OCO Order Response - Stop Component Canceled
<< 2/28/2013 9:40:41 AM  [fixexecutionreport] 34=914|49=T4|56=T4Example|50=T4FIX|52=20130228-15:40:41.762|143=US,IL|1=Account1|11=oco-2-634976411671480107|66=fnl-634976411671480107|17=48117.6421177334_ESH3.63497641246463000018.2.F5B7F280|150=4|37=F5B7F280-56A7-4EC7-8CFA-681A512305CB|39=4|48=CME_20130300_ESH3|55=ES|207=CME_Eq|200=201303|59=0|107=E-mini S&P 500 Mar13|54=1|167=FUT|38=0|40=3|99=150000|60=20130228-15:40:46.463|21=1|204=0|1385=1|
[FIXEXECUTIONREPORT]
[MsgSeqNum] 34 = 914
[SenderCompID] 49 = T4
[TargetCompID] 56 = T4Example
[SenderSubID] 50 = T4FIX
[SendingTime] 52 = 20130228-15:40:41.762
[TargetLocationID] 143 = US,IL
[Account] 1 = Account1
[ClOrdID] 11 = oco-2-634976411671480107
[ListID] 66 = fnl-634976411671480107
[ExecID] 17 = 48117.6421177334_ESH3.63497641246463000018.2.F5B7F280
[ExecType] 150 = 4 (CANCELED)
[OrderID] 37 = F5B7F280-56A7-4EC7-8CFA-681A512305CB
[OrdStatus] 39 = 4 (CANCELED)
[SecurityID] 48 = CME_20130300_ESH3
[Symbol] 55 = ES
[SecurityExchange] 207 = CME_Eq
[MaturityMonthYear] 200 = 201303
[TimeInForce] 59 = 0 (DAY)
[SecurityDesc] 107 = E-mini S&P 500 Mar13
[Side] 54 = 1 (BUY)
[SecurityType] 167 = FUT (FUTURE)
[OrderQty] 38 = 0
[OrdType] 40 = 3 (STOP)
[StopPx] 99 = 150000
[TransactTime] 60 = 20130228-15:40:46.463
[HandlInst] 21 = 1 (AUTOMATED_EXECUTION_ORDER_PRIVATE_NO_BROKER_INTERVENTION)
[CustomerOrFirm] 204 = 0 (CUSTOMER)
[ContingencyType] 1385 = 1 (OCO)

Further details on the tags used for this order type are described in the dictionary of the New Order List message.

Trade how you want, where you want

support@ctsfutures.com (312) 939 0164

2 Pierce Pl, Suite 200, Itasca, IL 60143

© 2009-2023 Cunningham Trading Systems LLC All rights reserved.